package com.example.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Post {
    private Integer id; // 帖子自增ID
    private String title; // 帖子标题
    private String content; // 帖子内容
    private Integer userId; // 发布帖子的用户ID
    private Integer categoryId; // 帖子所属分类ID
    private Date createTime; // 帖子创建时间
    private Date updateTime; // 帖子更新时间

    //所有评论
    private List<Comment> comments;

    private Users user;

    private Category category;
}
